FROM openjdk:8-jre-alpine
MAINTAINER gomro <develop-groups@gomro.com>

ARG JAR_FILE
ARG APP_VERSION
ARG APP_DEBUG

ENV TZ=Asia/Shanghai \
    PROFILES=dev \
    APP_VERSION=${APP_VERSION} \
    APP_DEBUG=${APP_DEBUG}

COPY ${JAR_FILE} /app.jar

ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dspring.profiles.active=${PROFILES}", "-jar", "/app.jar"]

EXPOSE 80